package cn.edu.scau.cmi.zhangjunming.client;

import java.net.URL;

import cn.edu.scau.cmi.zhangjunming.spring.addHibernate.SpringAddHibController;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class SpringAddHibernateClient extends Application{

	@Override
	public void start(Stage primaryStage) throws Exception {
		// TODO 自动生成的方法存根
		try {
			SpringAddHibController.setStage(primaryStage);
			Parent root = FXMLLoader.load(getFxmlUrl());
			primaryStage.setTitle("SpringAddHibernate");
			primaryStage.setScene(new Scene(root));
			primaryStage.show();
		}catch(Exception e) {
			e.printStackTrace();
		}
	}
	
	private URL getFxmlUrl() {
		SpringAddHibController springController = new SpringAddHibController();
		return springController.getClass().getResource("SpringaddHibernate.fxml");
	}

	public static void main(String[] args) {
		// TODO 自动生成的方法存根
        launch(args);
	}

	

}
